object DM: TDM
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Height = 642
  Width = 665
  object Conn: TADOConnection
    CommandTimeout = 60
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=gogen;Persist Security Info=True;Us' +
      'er ID=sa;Initial Catalog=two;Data Source=inspiron'
    ConnectionTimeout = 60
    LoginPrompt = False
    Provider = 'SQLOLEDB.1'
    Left = 128
    Top = 56
  end
  object qTemp: TADOQuery
    Connection = Conn
    Parameters = <>
    Left = 72
    Top = 56
  end
  object dsMWDzis: TDataSource
    DataSet = qMWDzis
    Left = 112
    Top = 136
  end
  object qMWDzis: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, '
      'round(ObrMWDzis/nullif(PlanMwDzis,0) * 100, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMWDzis<>0 and PlanMwDzis>0'
      'order by ObrMwDzis/nullif(PlanMwDzis,0) desc')
    Left = 48
    Top = 136
    object qMWDzisHandlowiec: TStringField
      FieldName = 'Handlowiec'
      FixedChar = True
      Size = 21
    end
    object qMWDzisPlan: TFloatField
      FieldName = 'Plan'
      ReadOnly = True
    end
  end
  object qMDDzis: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, '
      'round(ObrMDDzis/nullif(PlanMdDzis,0) * 100, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMdDzis<>0 and PlanMdDzis>0'
      'order by ObrMdDzis/nullif(PlanMdDzis,0) desc')
    Left = 48
    Top = 208
  end
  object qMWMsc: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec,'
      '      round(ObrMWMsc*22/20/PlanMWMsc * 100, 0) as [Plan] '
      '       from mba..tw_rank with (nolock)'
      '       where typ=200 and ObrMWMsc<>0 and PlanMWMsc>0'
      '       order by ObrMWMsc/PlanMWMsc desc')
    Left = 216
    Top = 144
    object qMWMscHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMWMscPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      Precision = 32
      Size = 13
    end
  end
  object qMDMsc: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec,'
      '      round(ObrMWMsc*22/20/PlanMWMsc * 100, 0) as [Plan] '
      '       from mba..tw_rank with (nolock)'
      '       where typ=200 and ObrMWMsc<>0 and PlanMWMsc>0'
      '       order by ObrMWMsc/PlanMWMsc desc')
    Left = 216
    Top = 208
    object qMDMscHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMDMscPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      Precision = 32
      Size = 13
    end
  end
  object dsMDDzis: TDataSource
    DataSet = qMDDzis
    Left = 112
    Top = 208
  end
  object dsMWMsc: TDataSource
    DataSet = qMWMsc
    Left = 288
    Top = 144
  end
  object dsMDMsc: TDataSource
    DataSet = qMDMsc
    Left = 288
    Top = 208
  end
  object dsKlienciDzis: TDataSource
    DataSet = qKlienciDzis
    Left = 120
    Top = 312
  end
  object dsKTMDzis: TDataSource
    DataSet = qKTMDzis
    Left = 120
    Top = 384
  end
  object qKlienciDzis: TADOQuery
    Connection = Conn
    Parameters = <>
    Left = 48
    Top = 312
  end
  object qKTMDzis: TADOQuery
    Connection = Conn
    Parameters = <>
    Left = 48
    Top = 384
  end
  object dsKlienciMsc: TDataSource
    DataSet = qKlienciMsc
    Left = 296
    Top = 312
  end
  object dsKTMMsc: TDataSource
    DataSet = qKTMMsc
    Left = 296
    Top = 384
  end
  object qKlienciMsc: TADOQuery
    Connection = Conn
    Parameters = <>
    Left = 224
    Top = 312
  end
  object qKTMMsc: TADOQuery
    Connection = Conn
    Parameters = <>
    Left = 224
    Top = 384
  end
  object qMWObMsc: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, round(ObrMWMsc, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMWMsc<>0'
      'order by ObrMwMsc desc')
    Left = 48
    Top = 480
    object qMWObMscHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMWObMscPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
  end
  object qMDObMsc: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, round(ObrMDMsc, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMDMsc<>0'
      'order by ObrMDMsc desc')
    Left = 48
    Top = 544
    object qMDObMscHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMDObMscPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 19
      Size = 2
    end
  end
  object qMWObDzis: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, round(ObrMWDzis, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMWDzis<>0'
      'order by ObrMwDzis desc')
    Left = 232
    Top = 480
    object qMWObDzisHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMWObDzisPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
  end
  object qMDObDzis: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select rtrim(opis) as Handlowiec, round(ObrMDDzis, 0) as [Plan]'
      'from mba..tw_rank with (nolock)'
      'where typ=200 and ObrMDDzis<>0'
      'order by ObrMDDzis desc')
    Left = 232
    Top = 544
    object qMDObDzisHandlowiec: TStringField
      FieldName = 'Handlowiec'
      ReadOnly = True
      Size = 21
    end
    object qMDObDzisPlan: TBCDField
      FieldName = 'Plan'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 19
      Size = 2
    end
  end
  object dsMWObDzis: TDataSource
    DataSet = qMWObDzis
    Left = 304
    Top = 480
  end
  object dsMDObDzis: TDataSource
    DataSet = qMDObDzis
    Left = 304
    Top = 544
  end
  object dsMWObMsc: TDataSource
    DataSet = qMWObMsc
    Left = 120
    Top = 480
  end
  object dsMDObMsc: TDataSource
    DataSet = qMDObMsc
    Left = 120
    Top = 544
  end
  object twDostep1: TtwDostep
    Connection = Conn
    Parameters = <>
    Left = 224
    Top = 56
  end
  object qHandl: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select * from mba..tw_RANK with (nolock)')
    Left = 392
    Top = 64
    object qHandlTyp: TIntegerField
      FieldName = 'Typ'
    end
    object qHandlOpis: TStringField
      FieldName = 'Opis'
      FixedChar = True
      Size = 21
    end
    object qHandlObrMsc: TBCDField
      FieldName = 'ObrMsc'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlObrDzis: TBCDField
      FieldName = 'ObrDzis'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlObrMWMsc: TBCDField
      FieldName = 'ObrMWMsc'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlObrMWDzis: TBCDField
      FieldName = 'ObrMWDzis'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlObrMDMsc: TBCDField
      FieldName = 'ObrMDMsc'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 19
      Size = 2
    end
    object qHandlObrMDDzis: TBCDField
      FieldName = 'ObrMDDzis'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 19
      Size = 2
    end
    object qHandlPlanMsc: TBCDField
      FieldName = 'PlanMsc'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlPlanMWMsc: TBCDField
      FieldName = 'PlanMWMsc'
      DisplayFormat = '# ##0'
      Precision = 18
      Size = 2
    end
    object qHandlPlanMDMsc: TBCDField
      FieldName = 'PlanMDMsc'
      ReadOnly = True
      DisplayFormat = '# ##0'
      Precision = 19
      Size = 2
    end
    object qHandlPlanDzis: TFloatField
      FieldName = 'PlanDzis'
      ReadOnly = True
      DisplayFormat = '# ##0'
    end
    object qHandlPlanMWDzis: TFloatField
      FieldName = 'PlanMWDzis'
      ReadOnly = True
      DisplayFormat = '# ##0'
    end
    object qHandlPlanMDDzis: TFloatField
      FieldName = 'PlanMDDzis'
      ReadOnly = True
      DisplayFormat = '# ##0'
    end
  end
  object dsHandl: TDataSource
    DataSet = qHandl
    Left = 448
    Top = 64
  end
  object qParamHandl: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT DniRob, DniRobOd FROM MBA..TW_RANKINGI2 with (nolock)'
      ' WHERE TYP=300 and Opis='#39'USER1'#39)
    Left = 400
    Top = 144
    object qParamHandlDniRob: TIntegerField
      FieldName = 'DniRob'
    end
    object qParamHandlDniRobOd: TIntegerField
      FieldName = 'DniRobOd'
    end
  end
  object qNowi: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT SLPRSNID, COUNT(SLPRSNID) AS ILOSC'
      'FROM MBA..TW_NOWIKLIENCI with (NOLOCK)'
      'WHERE PERIODID=DATEPART(mm, GETDATE()) AND'
      '      YEAR1=DATEPART(yy, GetDate())'
      'GROUP BY SLPRSNID'
      'ORDER BY COUNT(SLPRSNID) DESC')
    Left = 400
    Top = 208
    object qNowiSLPRSNID: TStringField
      FieldName = 'SLPRSNID'
      FixedChar = True
      Size = 15
    end
    object qNowiILOSC: TIntegerField
      FieldName = 'ILOSC'
      ReadOnly = True
    end
  end
  object dsNowi: TDataSource
    DataSet = qNowi
    Left = 472
    Top = 208
  end
  object qNowiKlienci: TADOQuery
    Connection = Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT CUSTNMBR FROM '
      '    MBA..TW_NOWIKLIENCI with (NOLOCK) WHERE SLPRSNID='#39'STUDENT1'#39
      '    AND PERIODID=9 AND '
      '      YEAR1=2011')
    Left = 400
    Top = 272
  end
  object dsNowiKlienci: TDataSource
    DataSet = qNowiKlienci
    Left = 472
    Top = 272
  end
  object CMD: TADOCommand
    CommandTimeout = 0
    Connection = Conn
    Parameters = <>
    Left = 312
    Top = 64
  end
end
